import { createI18n } from 'vue-i18n'

const messages = {
    en: {
        ui: {
            sendPose: 'Send pose to ControlNet',
            keybinding: 'Key Bindings',
            canvas: 'Canvas',
            resizeCanvas: 'Resize Canvas',
            resetZoom: 'Reset Zoom',
            backgroundImage: 'Background Image',
            uploadImage: 'Upload Image',
            poseControl: 'Pose Control',
            addPerson: 'Add Person',
            uploadJSON: 'Upload JSON',
            downloadJSON: 'Download JSON',
            downloadImage: 'Download Image',
            addLeftHand: 'Add left hand',
            addRightHand: 'Add right hand',
            addFace: 'Add face',
            panningKeybinding: '(SPACE / F) + Drag Mouse',
            panningDescription: 'Hold key to pan the canvas',
            zoomKeybinding: 'Mouse wheel',
            zoomDescription: 'Zoom in/out',
            hideKeybinding: 'Right click',
            hideDescription: 'Hide keypoint',
            flip: 'Flip object',
        }
    },
    zh: {
        ui: {
            sendPose: '发送姿势到ControlNet',
            keybinding: '键位绑定',
            canvas: '画布',
            resizeCanvas: '调整画布大小',
            resetZoom: '重置画布缩放',
            backgroundImage: '背景图片',
            uploadImage: '上传图片',
            poseControl: '姿势控制',
            addPerson: '添加人物',
            uploadJSON: '上传JSON',
            downloadJSON: '下载JSON',
            downloadImage: '下载图片',
            addLeftHand: '添加左手',
            addRightHand: '添加右手',
            addFace: '添加脸部',
            panningKeybinding: '(空格 或 F) + 拖动鼠标',
            panningDescription: '拖动画布',
            zoomKeybinding: '鼠标滚轮',
            zoomDescription: '调整画布缩放',
            hideKeybinding: '鼠标右键',
            hideDescription: '隐藏关键点',
            flip: '左右翻转',
        }
    },
    ja: {
        ui: {
            sendPose: 'ControlNetにポーズを送信',
            keybinding: 'キーバインディング',
            canvas: 'キャンバス',
            resizeCanvas: 'キャンバスのサイズを調整',
            resetZoom: 'ズームをリセット',
            backgroundImage: '背景画像',
            uploadImage: '画像をアップロード',
            poseControl: 'ポーズコントロール',
            addPerson: '人物を追加',
            uploadJSON: 'JSONをアップロード',
            downloadJSON: 'JSONをダウンロード',
            downloadImage: '画像をダウンロード',
            addLeftHand: '左手を追加',
            addRightHand: '右手を追加',
            addFace: '顔を追加',
            panningKeybinding: '(SPACE / F) + マウスのドラッグ',
            panningDescription: 'キーを押しながらキャンバスをパン',
            zoomKeybinding: 'マウスホイール',
            zoomDescription: 'ズームイン/アウト',
            hideKeybinding: '右クリック',
            hideDescription: 'キーポイントを隠す',
        }
    },
    ko: {
        ui: {
            sendPose: 'ControlNet에 자세 보내기',
            keybinding: '키 바인딩',
            canvas: '캔버스',
            resizeCanvas: '캔버스 크기 조정',
            resetZoom: '줌 리셋',
            backgroundImage: '배경 이미지',
            uploadImage: '이미지 업로드',
            poseControl: '자세 제어',
            addPerson: '사람 추가',
            uploadJSON: 'JSON 업로드',
            downloadJSON: 'JSON 다운로드',
            downloadImage: '이미지 다운로드',
            addLeftHand: '왼손 추가',
            addRightHand: '오른손 추가',
            addFace: '얼굴 추가',
            panningKeybinding: '(스페이스바 / F) + 마우스 드래그',
            panningDescription: '키를 누르고 캔버스 이동',
            zoomKeybinding: '마우스 휠',
            zoomDescription: '확대/축소',
            hideKeybinding: '오른쪽 클릭',
            hideDescription: '키포인트 숨기기',
        }
    },
    ru: {
        ui: {
            sendPose: 'Отправить позу в ControlNet',
            keybinding: 'Привязка клавиш',
            canvas: 'Холст',
            resizeCanvas: 'Изменить размер холста',
            resetZoom: 'Сбросить масштаб',
            backgroundImage: 'Фоновое изображение',
            uploadImage: 'Загрузить изображение',
            poseControl: 'Управление позой',
            addPerson: 'Добавить персонажа',
            uploadJSON: 'Загрузить JSON',
            downloadJSON: 'Скачать JSON',
            downloadImage: 'Скачать изображение',
            addLeftHand: 'Добавить левую руку',
            addRightHand: 'Добавить правую руку',
            addFace: 'Добавить лицо',
            panningKeybinding: '(ПРОБЕЛ / F) + Перетаскивание мыши',
            panningDescription: 'Зажмите клавишу, чтобы передвинуть холст',
            zoomKeybinding: 'Колесо мыши',
            zoomDescription: 'Увеличить/уменьшить',
            hideKeybinding: 'Правый клик',
            hideDescription: 'Скрыть ключевую точку',
        }
    },
    de: {
        ui: {
            sendPose: 'Pose an ControlNet senden',
            keybinding: 'Tastenbelegung',
            canvas: 'Leinwand',
            resizeCanvas: 'Leinwandgröße ändern',
            resetZoom: 'Zoom zurücksetzen',
            backgroundImage: 'Hintergrundbild',
            uploadImage: 'Bild hochladen',
            poseControl: 'Pose Kontrolle',
            addPerson: 'Person hinzufügen',
            uploadJSON: 'JSON hochladen',
            downloadJSON: 'JSON herunterladen',
            downloadImage: 'Bild herunterladen',
            addLeftHand: 'Linke Hand hinzufügen',
            addRightHand: 'Rechte Hand hinzufügen',
            addFace: 'Gesicht hinzufügen',
            panningKeybinding: '(LEERTASTE / F) + Maus ziehen',
            panningDescription: 'Halten Sie die Taste gedrückt, um die Leinwand zu verschieben',
            zoomKeybinding: 'Mausrad',
            zoomDescription: 'Vergrößern/Verkleinern',
            hideKeybinding: 'Rechtsklick',
            hideDescription: 'Schlüsselpunkt verbergen',
        }
    },
    es: {
        ui: {
            sendPose: 'Enviar pose a ControlNet',
            keybinding: 'Atajos de teclado',
            canvas: 'Lienzo',
            resizeCanvas: 'Cambiar tamaño de lienzo',
            resetZoom: 'Restablecer zoom',
            backgroundImage: 'Imagen de fondo',
            uploadImage: 'Subir imagen',
            poseControl: 'Control de pose',
            addPerson: 'Añadir persona',
            uploadJSON: 'Subir JSON',
            downloadJSON: 'Descargar JSON',
            downloadImage: 'Descargar imagen',
            addLeftHand: 'Añadir mano izquierda',
            addRightHand: 'Añadir mano derecha',
            addFace: 'Añadir rostro',
            panningKeybinding: '(ESPACIO / F) + Arrastrar ratón',
            panningDescription: 'Mantén presionada la tecla para mover el lienzo',
            zoomKeybinding: 'Rueda del ratón',
            zoomDescription: 'Acercar/Alejar',
            hideKeybinding: 'Clic derecho',
            hideDescription: 'Ocultar punto clave',
        }
    },
    fr: {
        ui: {
            sendPose: 'Envoyer la pose à ControlNet',
            keybinding: 'Raccourcis clavier',
            canvas: 'Toile',
            resizeCanvas: 'Redimensionner la toile',
            resetZoom: 'Réinitialiser le zoom',
            backgroundImage: 'Image de fond',
            uploadImage: 'Télécharger une image',
            poseControl: 'Contrôle de pose',
            addPerson: 'Ajouter une personne',
            uploadJSON: 'Télécharger JSON',
            downloadJSON: 'Télécharger JSON',
            downloadImage: 'Télécharger une image',
            addLeftHand: 'Ajouter la main gauche',
            addRightHand: 'Ajouter la main droite',
            addFace: 'Ajouter un visage',
            panningKeybinding: '(ESPACE / F) + Glisser la souris',
            panningDescription: 'Maintenez la touche pour déplacer la toile',
            zoomKeybinding: 'Molette de la souris',
            zoomDescription: 'Zoomer/Dézoomer',
            hideKeybinding: 'Clic droit',
            hideDescription: 'Masquer le point clé',
        }
    }
};

export default createI18n({
    locale: navigator.language.split('-')[0] || 'en',
    fallbackLocale: 'en',
    messages,
});
